Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add on-the-fly Registered Slide Visualization #875

Draft
wants to merge 20 commits into
base: develop
Choose a base branch
from

Conversation

measty
Copy link
Collaborator

@measty measty commented Oct 22, 2024

This PR is a rough draft of code to allow a registration transform to be loaded as an 'overlay', which will allow the slide to be viewed as if that registration transform had been applied to it. This will work with either an affine transformation saved as a .npy, or a non-rigid one represented by a SimpleITK displacement field saved as a .mha (such as what would be output by DeeperHistoReg, for example).

It introduces a new WSIReader subclass called TransformedWSIReader, which when initialized with a slide and transformation will apply the transformation on the fly when regions are requested.

It also adds '.npy' and '.mha' to the overlay types the visualization tool picks up; upon loading one of these types, the current slide will be opened as a TransformedWSIReader with that transform, allowing it to be visualized on the fly as a registered slide.

still to do:

  • Implement read_bounds (currently only done read_rect)
  • Correctly handle coord_space argument
  • Check affine capabilities of read_bounds
  • Add unit tests

@shaneahmed shaneahmed changed the title ENH: Add on-the-fly registered slide visualization ✨ Add on-the-fly Registered Slide Visualization Oct 23, 2024
@shaneahmed shaneahmed added the enhancement New feature or request label Oct 23, 2024
@shaneahmed shaneahmed added this to the Release v1.6.0 milestone Oct 23, 2024
@adamshephard adamshephard self-assigned this Feb 27, 2025
Copy link

codecov bot commented Feb 27, 2025

Codecov Report

Attention: Patch coverage is 14.28571% with 132 lines in your changes missing coverage. Please review.

Project coverage is 98.42%. Comparing base (ba0109f) to head (8b1905f).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
tiatoolbox/wsicore/wsireader.py 13.60% 127 Missing ⚠️
tiatoolbox/visualization/tileserver.py 20.00% 3 Missing and 1 partial ⚠️
tiatoolbox/visualization/bokeh_app/main.py 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #875      +/-   ##
===========================================
- Coverage    99.90%   98.42%   -1.49%     
===========================================
  Files           70       70              
  Lines         8735     8885     +150     
  Branches      1149     1164      +15     
===========================================
+ Hits          8727     8745      +18     
- Misses           3      133     +130     
- Partials         5        7       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants